package com.asohofrucol.service;

import java.util.List;
import java.util.Map;

import org.primefaces.model.SortOrder;
import org.springframework.data.domain.Page;

import com.asohofrucol.dto.AgrarianResourceDTO;
import com.asohofrucol.dto.AgrarianResourceRegisterDTO;
import com.asohofrucol.dto.AssociativityDTO;
import com.asohofrucol.dto.ForestResourceDTO;
import com.asohofrucol.dto.ForestResourceRegisterDTO;
import com.asohofrucol.dto.LivestockResourceDTO;
import com.asohofrucol.dto.LivestockResourceRegisterDTO;
import com.asohofrucol.dto.ProcessTransferInnovationDTO;
import com.asohofrucol.dto.ProcessTransferInnovationRegisterDTO;
import com.asohofrucol.dto.RuatRegisterDTO;
import com.asohofrucol.dto.SurveyDTO;
import com.asohofrucol.model.Ruat;

public interface UserOwnerService {

	public RuatRegisterDTO findOne(Long id);
	
	public RuatRegisterDTO findOneIdTypeIdNumber(Long idType, String idNumber);
	
	public Boolean registerAlreadyExisist(RuatRegisterDTO ruatRegisterDTO);

	public ProcessTransferInnovationDTO getProcessTransferInnovationDTOByRuatId(
			Long ruatId);

	public void saveProcessTransferInnovationDTO(
			ProcessTransferInnovationDTO ptiDto, String userModifier);

	public AssociativityDTO getAssociativityDTOByRuatId(Long ruatId);

	public void saveAssociativityDTO(AssociativityDTO asDTO, String userModifier );

	public AgrarianResourceDTO getAgrarianResourceDTOByRuatId(Long ruatId);

	public void saveAgrarianResourceDTO(AgrarianResourceDTO arDTO, String userModifier);

	public ForestResourceDTO getForestResourceDTOByRuatId(Long ruatId);

	public void saveForestResource(ForestResourceDTO foDTO, String userModifier);

	public LivestockResourceDTO getLivestockResourceDTOByRuatId(Long ruatId);

	public void saveLivestockResource(LivestockResourceDTO foDTO, String userModifier);

	public List<RuatRegisterDTO> findRuatDtoListByParamas(Long idType,
			String numberId, String name);

	public SurveyDTO getSurveyByRuatId(Long ruatid);

	public void saveSurvey(SurveyDTO suDTO, String userModifier);

	public void deleteRuat(Long ruatId, String userModifier);

	public RuatRegisterDTO saveRuatRegisterDTO(RuatRegisterDTO ruatRegisterDTO,
			String userModifier);

	/**
	 * 
	 * @param first
	 * @param pageSize
	 * @param sortField
	 * @param sortOrder
	 * @param filters
	 * @return List<RuatRegisterDTO> Este metodo se contruye para manejar server
	 *         pagination
	 * 
	 */
	public Page<Ruat> load(int pageIndex, int pageSize, String sortField,
			SortOrder sortOrder, Map<String, String> filters);

	public void deleteProcessTransferInnovation(ProcessTransferInnovationRegisterDTO selected,
			String userModifier);

	public void deleteAgrarianResourceRegister(
			AgrarianResourceRegisterDTO selected, String userModifier);

	public void deleteLivestockResourceRegister(
			LivestockResourceRegisterDTO selected, String userModifier);

	public void deleteForestResourceRegister(
			ForestResourceRegisterDTO selected, String userModifier);
	
}
